// pages/app/user/point/point.js
const app = getApp();
var host = app.globalData.host;
var utils = app.globalData.utils;
var self = null;

Page({
  data: {
    themeColor: '',
    themeColor2: '',
    themeColor3: '',
    defaultColor: '',
    borderColor: '',
    point: 0,
    list: []
  },
  onLoad: function (options) {
    self = this;
    self.getStyle();
    self.init();
  },
  getStyle() {
    self.setData({
      themeColor: app.globalData.themeColor,
      themeColor2: app.globalData.themeColor2,
      themeColor3: app.globalData.themeColor3,
      defaultColor: app.globalData.defaultColor,
      borderColor: app.globalData.borderColor
    })
  },
  init() {
    var url = host + '/lx/mini/user/point';
    var params = {
    };
    var success = function (res) {
      console.log(res);
      self.setData({
        // list: res.info.list,
        // pageNum: res.info.pageNumber,
        // pageSize: res.info.pageSize,
        // totalPage: res.info.totalPage,
        point: res.info
      })
    }
    var fail = function (res) {
    };
    var complete = function () { };
    utils.request(url, params, success, fail, complete);
  }
})